package com.aishua.fire.mapper;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Component;

import com.aishua.fire.entity.addressBook.AddAddressBookInfos;
import com.aishua.fire.mapper.dto.AccountData;
import com.aishua.fire.mapper.dto.AccountList;
import com.aishua.fire.mapper.dto.AccteamList;
import com.aishua.fire.mapper.dto.SendMsgData;

@Component
public interface AccountMapper {

	/**
	 * 根据userName和loginId查询账户列表
	 * @param pram
	 */
	List<AccountList> findByUserNameAndLoginId(Map<String, String> pram);

	/**
	 * 通过账户组id找到对应的账户信息
	 * @param pram
	 */
	 List<AccteamList> findAccountByaccountteamId(Map<String, Object> pram);
	 
	 /**
		 * 通过账户id找到对应的账户信息
		 * @param pram
		 */
	 AccteamList findAccountById(Map<String, Object> pram);

	 /**
	  * 获取所有的账户列表
	  * @return
	  */
	 List<AccountData> findAllAccountData();

	 /**
	  * 通过账户id 
	  * @param accountId
	  * @return
	  */
	 List<SendMsgData> getSendMsgs(Long accountId);
	 
	 /**
	  * 账户重复性验证
	  * @param accountId
	  * @return
	  */
	Long findLoginIdByUserName(Map<String, Object> pram);

	/**
	 * 根据手机号查询当前用户是否被添加为通讯录员工
	 * @param phone
	 * @return
	 */
	AddAddressBookInfos getaddressBookByPhone(String phone);

	/**
	 * 关联登录账号与通讯录信息
	 * @param addressBook
	 */
	void updateAddressBookInfo(AddAddressBookInfos addressBook);

	/**
	 * 关联登录账号与通讯录信息
	 * @param addressBook
	 */
	int listTotal(Map<String, String> pram);
}
